import Vue from 'vue'
import Router from 'vue-router'

//将组件引入
const Index = () => import('@/components/index')
const WeekClasses = () => import('@/components/weekclasses')
const PersonalCenter = () => import('@/components/personalcenter')
const NotFoundPage = () => import('@/components/notfoundpage')

Vue.use(Router)

//创建组件路由路径
const routes = [
    {
      path: '/index',
      name: 'index',
      component: Index,
	  alias:"/"
    },
	{
      path: '/weekclasses',
      name: 'weekclasses',
      component: WeekClasses
    },
	{
      path: '/personalcenter',
      name: 'personalcenter',
      component: PersonalCenter
    },
	{
      path: '*',
      name: 'notfoundpage',
      component: NotFoundPage
    }
]

export default new Router({
  mode : "history",
  routes
})